Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add events page #66

Open
wants to merge 46 commits into
base: dev
Choose a base branch
from
Open

feat: Add events page #66

wants to merge 46 commits into from

Conversation

ZeroWave022
Copy link
Member

@ZeroWave022 ZeroWave022 commented Oct 24, 2024

The page lists events, separated into active, upcoming and past events.
There's also a separate page each event, so more information can be shown.

  • Main page for events
  • Events are grouped into internal and open events
  • Own pages for each event

@ZeroWave022 ZeroWave022 marked this pull request as ready for review October 31, 2024 18:13
The ARIA label is placed correctly, however lighthouse can't find which text it's referring to
@seandreassen
Copy link
Member

Suspense looks horrible on small screens, you have probably haven't updated layout.tsx after updating page.tsx.
bilde

@seandreassen
Copy link
Member

Event card skeleton is slightly shorter than event card.

@seandreassen
Copy link
Member

Maybe this large block of text should be replaced by the same type of event skeleton as below it.
bilde

src/components/events/EventCardSkeleton.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/[id]/layout.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/[id]/layout.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/loading.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCardSkeleton.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/[id]/page.tsx Outdated Show resolved Hide resolved
Copy link
Member

@michaelbrusegard michaelbrusegard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look at UI next time, but skimmed through the code now and commented on what I remembered

src/app/[locale]/(default)/events/[id]/layout.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/[id]/page.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/[id]/page.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/[id]/page.tsx Outdated Show resolved Hide resolved
src/app/[locale]/(default)/events/page.tsx Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
src/components/events/EventCard.tsx Outdated Show resolved Hide resolved
Copy link
Member

@michaelbrusegard michaelbrusegard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI things:

  • Badge needs either tooltip or pointer-events-none. since it has a hover effect.
  • Add a larger padding between the text and the Image.
  • Add a hover effect to the Cards.
  • Fix the ring effect for the Link element used on the cards so it works with keyboard navigation.
  • The suspense cards are a little shorter than the actual cards.
  • As an addition it would maybe be nice to make the heading clickable so it scrolls down to them. I think this can be done with a simple id and a link or something using #.
  • Style the text for the time differently from the rest of the cards. I dont know the best way, maybe put it in a strong tag to make it bold or look at examples online

<>
<h1 className='my-4'>{t('title')}</h1>
<Link href='#active'>
<h2 className='my-2' id='active'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h2 className='my-2' id='active'>
<h2 className='pt-4 mb-4' id='active'>

Should have consistent spacing

))}
</div>
<Link href='#past'>
<h2 className='my-4' id='past'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h2 className='my-4' id='past'>
<h2 className='pt-4 mb-4' id='past'>

mt-4 and my-4 doesn't add space to the top for some reason, pt-4 mb-4 will give the same styling as in loading.tsx

return (
<>
<h1 className='my-4'>{t('title')}</h1>
<h2 className='my-2'>{t('activeEvents')}</h2>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h2 className='my-2'>{t('activeEvents')}</h2>
<h2 className='my-4'>{t('activeEvents')}</h2>

Consistent styling with other h2 elements

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component is still ~5px shorter than the actual component.

export default function EventDetailsLoading() {
return (
<>
<Skeleton className='my-4 h-12 w-3/4 rounded-lg' />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Skeleton className='my-4 h-12 w-3/4 rounded-lg' />
<Skeleton className='mt-6 mb-4 h-12 w-3/4 rounded-lg' />

To keep same layout as in the actual page

const t = await getTranslations('events');
return (
<>
<Button variant='secondary' aria-label='Back to Events' asChild>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aria-label isn't translated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants